Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor editor/world processor fixes and tweaks #10505

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ApsZoldat
Copy link
Contributor

  1. Fix search input in rules dialog applying trim() to newly typed spaces (it made starting a new word impossible without moving cursor to the middle)
  2. Make some editor-related search inputs lowercase text and remove unwanted spaces in it without affecting original user input
  3. Fix info buttons in rules dialog going off the screen on mobile by enabling scrollX if there's not enough space
  4. Make spawnunit able to spawn hidden units just like setprop @payloadType does (regarding the !type.internal removal: internal units still can't be spawned because they're not in global processor vars)

If your pull request is not translation or serverlist-related, read the list of requirements below and check each box:

  • I have read the contribution guidelines.
  • I have ensured that my code compiles, if applicable.
  • I have ensured that any new features in this PR function correctly in-game, if applicable.

@@ -1431,7 +1431,7 @@ public void run(LExecutor exec){

Team t = team.team();

if(type.obj() instanceof UnitType type && !type.internal && !type.hidden && t != null && Units.canCreate(t, type)){
if(type.obj() instanceof UnitType type && t != null && Units.canCreate(t, type)){
Copy link
Owner

@Anuken Anuken Feb 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is very important that internal units should not be spawned, as they could cause a crash.

Copy link
Contributor Author

@ApsZoldat ApsZoldat Feb 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know about this, as i stated in PR description, internal units still cannot be spawned because such global variables just don't exist.

But now i think this change still isn't worth it, because it won't go well in case someone decides to add some global vars, so i'll revert it.

upd: it still will be possible to spawn internal units by using setprop @payloadType (if they somehow appear in global vars), so i might change this as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants